﻿using System;

namespace HslCommunication.Core.IMessage
{
	/// <summary>
	/// Kuka机器人的 KRC4 控制器中的服务器KUKAVARPROXY
	/// </summary>
	// Token: 0x0200015A RID: 346
	public class KukaVarProxyMessage : INetMessage
	{
		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.ProtocolHeadBytesLength" />
		// Token: 0x170005E7 RID: 1511
		// (get) Token: 0x06001D57 RID: 7511 RVA: 0x0008D47D File Offset: 0x0008B67D
		public int ProtocolHeadBytesLength
		{
			get
			{
				return 4;
			}
		}

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.HeadBytes" />
		// Token: 0x170005E8 RID: 1512
		// (get) Token: 0x06001D58 RID: 7512 RVA: 0x0008D480 File Offset: 0x0008B680
		// (set) Token: 0x06001D59 RID: 7513 RVA: 0x0008D488 File Offset: 0x0008B688
		public byte[] HeadBytes { get; set; }

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.ContentBytes" />
		// Token: 0x170005E9 RID: 1513
		// (get) Token: 0x06001D5A RID: 7514 RVA: 0x0008D491 File Offset: 0x0008B691
		// (set) Token: 0x06001D5B RID: 7515 RVA: 0x0008D499 File Offset: 0x0008B699
		public byte[] ContentBytes { get; set; }

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.CheckHeadBytesLegal(System.Byte[])" />
		// Token: 0x06001D5C RID: 7516 RVA: 0x0008CD5E File Offset: 0x0008AF5E
		public bool CheckHeadBytesLegal(byte[] token)
		{
			return true;
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.GetContentLengthByHeadBytes" />
		// Token: 0x06001D5D RID: 7517 RVA: 0x0008D4A4 File Offset: 0x0008B6A4
		public int GetContentLengthByHeadBytes()
		{
			byte[] headBytes = this.HeadBytes;
			bool flag = headBytes != null && headBytes.Length >= 4;
			int result;
			if (flag)
			{
				result = (int)this.HeadBytes[2] * 256 + (int)this.HeadBytes[3];
			}
			else
			{
				result = 0;
			}
			return result;
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.GetHeadBytesIdentity" />
		// Token: 0x06001D5E RID: 7518 RVA: 0x0008D4EC File Offset: 0x0008B6EC
		public int GetHeadBytesIdentity()
		{
			byte[] headBytes = this.HeadBytes;
			bool flag = headBytes != null && headBytes.Length >= 4;
			int result;
			if (flag)
			{
				result = (int)this.HeadBytes[0] * 256 + (int)this.HeadBytes[1];
			}
			else
			{
				result = 0;
			}
			return result;
		}

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.SendBytes" />
		// Token: 0x170005EA RID: 1514
		// (get) Token: 0x06001D5F RID: 7519 RVA: 0x0008D532 File Offset: 0x0008B732
		// (set) Token: 0x06001D60 RID: 7520 RVA: 0x0008D53A File Offset: 0x0008B73A
		public byte[] SendBytes { get; set; }
	}
}
